<template>
    <div>
        <div class="dashboardbox">
            <div style="display: flex;justify-content: space-between;align-items: center;width: 98%;margin: 0px auto;">
                <div class="titbox">服务类型数据采集分析</div>
                <div class="z-date-radio">
                    <div class="z-date-radio__item" :class="{ 'z-date-radio__item--active': index === active }" v-for="(item, index) in options" :key="index" @click="change(index)">
                        {{ item }}
                    </div>
                </div>
            </div>
            <v-chart class="dashboard-chart" :option="option" autoresize></v-chart>
            <!-- <checkradio></checkradio> -->
        </div>
    </div>
</template>

<script>
// import checkradio from 'z-date-radio/index.vue'
export default {
    name: "boxsix",
    props: {
        list: {
            type: Array,
            defulat: []
        },
        option: {
            type: Object,
            defulat: {}
        },
    },
    components: {
        // checkradio
    },
    data() {
        return {
            options: ["当天", "近七天", "总数"],
            active: 0
        }
    },

    methods: {
        change(index) {
            this.active = index
            this.$emit('selectindex', this.active + 1)
        }
    }

};
</script>

<style scoped>
.dashboard-charts {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 20px 0;
}
.dashboard-chart {
    box-sizing: border-box;
    width: 90%;
    /* min-width: 49%; */
    /* padding: 20px; */
    height: 360px;
    overflow: hidden;
    border-radius: 5px;
    cursor: pointer;
    transition: 0.3s;
    margin: 0 auto;
    /*  box-shadow: 0px 0px 0px 0px rgba(150, 150, 150, 0.35);
	    box-shadow: 0px 0px 4px 0px rgba(150, 150, 150, 0.35); */
}
.dashboardbox {
    /* display: flex;
		align-items: center; */
    width: 98%;
    margin: 0px auto 0 auto;
    /* height: 30rem; */
    height: 400px;
    /* margin-top: 0.8rem;
		margin-left: 0.6rem;
		padding: 0.6rem 2rem; */
    /* background-image: url("~@/assets/img/43.png");
		background-size: 100% 100%; */
    background: #fff;
    /* font-size: 1.6rem; */
    color: #23cefd;
}
.titbox {
    width: 24rem;
    height: 2.3rem;
    /* margin: 10px 0; */
    background-image: url("~@/assets/image/tit.png");
    background-size: 100% 100%;
    font-size: 1.2rem;
    padding: 0 0.6rem;
    margin: 10px 0 0 10px;
    font-family: Source Han Sans CN;
    font-weight: 400;
    color: #23cefd;
    line-height: 2.3rem;
}
.z-date-radio {
    display: flex;
    align-items: center;
    background: rgba(19, 33, 60, 0);
    box-shadow: inset 0 0 1rem #20bcfc;
    /* border: 1px solid #20bcfc; */
    width: 35%;
    height: 2.3rem;
    margin-right: 20px;
    margin-top: 6px;
}

.z-date-radio__item {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 33.3%;
    height: 2.3rem;
    font-size: 16px;
    color: #23cefd;
    opacity: 0.5;
    cursor: pointer;
    transition: all 0.3s;
}

.z-date-radio__item--active {
    box-shadow: inset 0 0 1rem #20bcfc;
    opacity: 1;
}
</style>
